/* ----------------------------------------------------------------------
*
* Copyright (C) 2025 XiaoFei. All rights reserved.
*
* $file:		XiaoFei_Uart5.h
* $Date:        13-January-2025
* $Revision: 	V1
* $Project: 	XiaoFei BSP Library
*
* -------------------------------------------------------------------- */

#ifndef __XiaoFei_Uart5_H
#define __XiaoFei_Uart5_H

#define Uart5_AddRx
#define Uart5_GPIO_TX			        GPIOC
#define Uart5_Pin_TX		            GPIO_Pin_12
#define Uart5_BaudRate		            9600

#ifdef Uart5_AddRx
    #define Uart5_GPIO_RX			    GPIOD
	#define Uart5_Pin_RX				GPIO_Pin_2
	#define Uart5_Group				    NVIC_PriorityGroup_2
	#define Uart5_ITPre				    1
	#define Uart5_ITSub				    1
#endif

/* 
* @function: 	Uart5_Init
*/
void Uart5_Init(void);

/* 
* @function: 	Uart5_SendByte
* @parameter:	[in] Byte					 The byte will be send.
*/
void Uart5_SendByte(unsigned char Byte);

/* 
* @function: 	Uart5_Printf
* @parameter:	[in] format					 The parameter will be send in Uart5_Printf.
*/
void Uart5_Printf(char *format, ...);

#ifdef Uart5_AddRx
/* 
* @function: 	UART5_IRQHandler
* @callback:	The function will be callback when the Uart5 receive the data.
*/
void UART5_IRQHandler(void);
#endif

#endif


